package cn.com.surker.sale.entity;

import cn.com.surker.enums.StateEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 合同授权记录变动表
 * </p>
 *
 * @author admin
 * @since 2024-07-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sale_contract_status_record")
public class ConStatusRecord implements Serializable {

	private static final long serialVersionUID = 1L;

	public ConStatusRecord() {
	}

	public ConStatusRecord(Long orgId, Long conId, Integer type, Integer workStatus, String remark, String creator, Date createTime) {
		this.orgId = orgId;
		this.conId = conId;
		this.type = type;
		this.workStatus = workStatus;
		this.remark = remark;
		this.creator = creator;
		this.createTime = createTime;
		this.status = StateEnum.ENABLED.getCode();
	}

	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 站点id
	 */
	private Long orgId;

	/**
	 * 合同id
	 */
	private Long conId;

	/**
	 * 变动类型(0,系统计算;1:人为操作)
	 */
	private Integer type;

	/**
	 * 合同状态
	 */
	private Integer workStatus;

	/**
	 * 状态(0:启用1：禁用)
	 */
	private Integer status;

	/**
	 * 备注
	 */
	private String remark;

	/**
	 * 创建人
	 */
	private String creator;

	/**
	 * 创建时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;

	/**
	 * 修改人
	 */
	private String updator;

	/**
	 * 修改时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date updateTime;


}
